import request from '@/utils/request'

// 查询BOM原材料列表
export function listRawmaterial(query) {
  return request({
    url: '/bomcostestimation/basedocument/rawmaterial/list',
    method: 'get',
    params: query
  })
}

// 查询BOM原材料详细
export function getRawmaterial(id) {
  return request({
    url: '/bomcostestimation/basedocument/rawmaterial/' + id,
    method: 'get'
  })
}

// 新增BOM原材料
export function addRawmaterial(data) {
  return request({
    url: '/bomcostestimation/basedocument/rawmaterial',
    method: 'post',
    data: data
  })
}

// 修改BOM原材料
export function updateRawmaterial(data) {
  return request({
    url: '/bomcostestimation/basedocument/rawmaterial',
    method: 'put',
    data: data
  })
}

// 删除BOM原材料
export function delRawmaterial(id) {
  return request({
    url: '/bomcostestimation/basedocument/rawmaterial/' + id,
    method: 'delete'
  })
}


// 引入原材料价格
export function introductionPrice(numbers) {
  return request({
    url: '/bomcostestimation/basedocument/rawmaterial/introductionPrice/' + numbers,
    method: 'get',
    timeout:60000
  })
}
